﻿using System;
using System.Collections.Generic;
using System.Text;
namespace Model
{
    public class ProtobufPacker
    {
        public object DeserializeFrom(Type messageType,byte[] buffer,int offset,int length)
        {
            return ProtobufHelper.FromBytes(messageType, buffer, offset, length);
        }

        public byte[] SerializeToByteArray(object message)
        {
            return ProtobufHelper.ToBytes(message);
        }
    }
}
